name: Storage compatibility tests

on:
  push:
    branches: [ master, dev ]
  pull_request:
    branches: [ '**' ]

env:
  CARGO_TERM_COLOR: always

jobs:
  test:

    runs-on: ubuntu-latest

    steps:
      - name: Install dependencies
        run: sudo apt-get install clang git-lfs
      - name: Setup git-lfs
        run: git lfs install
      - name: Install minimal stable
        uses: dtolnay/rust-toolchain@stable
      - uses: actions/checkout@v4
      - name: Install Protoc
        uses: arduino/setup-protoc@v3
        with:
          repo-token: ${{ secrets.GITHUB_TOKEN }}
      - uses: Swatinem/rust-cache@v2
      - name: Run storage compatibility test
        run: ./tests/storage-compat/storage-compatibility.sh
        shell: bash
